package com.itheima.api.client.fallback;

import com.itheima.api.client.ItemClient;
import com.itheima.api.vo.Goods;
import com.itheima.common.domain.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

public class ItemClientFallbackFactory implements FallbackFactory<ItemClient> {
    @Override
    public ItemClient create(Throwable cause) {
        return new ItemClient() {
            @Override
            public Result<List<Goods>> list() {
                return null;
            }
        };
    }
}
